<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>


    <style>

        div{
            width: 200px;
            height: 200px;
        }
        .box1{
            background-color: aqua;
            
            float: left;
        }

        .box2{
            background-color: blue;
            float: left;
        }

        .box3{
            background-color: red;
            clear: left;
        }

        .box4{
            background-color: rebeccapurple;
            
        }
        

        .box5{
            width: 400px;
            height: 400px;
            background-color: blue;
            margin-top: 10px;
            /* float: left; */
            /* overflow: hidden; */
            /* 可以给父盒子加paddin */
            /* padding-top: 30px; */
            /* border: 5px solid black; */
        }

        .box7{

            width: 200px;
            height: 200px;
            background-color: red;
            margin: 10px;
            

        }

        /* 子margin-top 用父盒子padding-top 
        给父盒子加border  外边框
         子盒子父盒子加上浮动 
         overflow：hidden bfc

        */

    /* 垂直方向 外边距取最大值
        水平方向会进行合并处理
    */

    </style>
</head>
<body>

    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
    <div class="box4"></div>
    
    <!-- 父子关系 -->

    <div class="box5">
        <div class="box7">


        </div>

    </div>
    <div class="box6">

        <div class="box8" ></div>

    </div>



    
</body>
</html>